package com.huawei.gamebox.plugin.gameservice.action;

import android.app.Activity;
import com.huawei.secure.android.common.intent.SafeIntent;
import o.Logger;
import o.dys.a;
import o.ezw;

public class ProtocolCheckAction extends IGameServiceAction {
    static final String ACTION_INIT_GAME_SERVICE = "com.huawei.gamebox.ACTION_INIT_GAME_SERVICE";
    private static final String TAG = "ProtocolCheckAction";
    private boolean isFinish = false;

    public ProtocolCheckAction(a aVar) {
        super(aVar);
    }

    public void onAction() {
        boolean z;
        this.isFinish = false;
        String stringExtra = new SafeIntent(this.callback.getIntent()).getStringExtra("isFirst");
        if (Logger.ˎ()) {
            Logger.ˏ(TAG, "isFirst:" + stringExtra);
        }
        if (stringExtra != null) {
            z = true;
        } else {
            z = false;
        }
        ezw.ॱ().ˋ((Activity) this.callback, z);
    }

    public void onDestroy() {
        if (!this.isFinish) {
            ezw.ॱ().ˋ(0, true);
        }
    }

    public void doFinish() {
        this.isFinish = true;
    }
}
